package com.doraz.orb.structs;

import com.doraz.orb.R;
import com.doraz.orb.methods.OrbMethod;

public class CommonMethod implements OrbObject {
	private String title;
	private OrbMethod method;
	private int drawableId;
	
	/**
	 * Object representing a common method
	 * 
	 * @param title
	 * @param method
	 */
	public CommonMethod(String title){
		this.title = title;
		this.method = null;
		this.drawableId = R.drawable.folder_ico;
	}
	
	/**
	 * Object representing a common method
	 * 
	 * @param title
	 * @param method
	 */
	public CommonMethod(String title, OrbMethod method){
		this.title = title;
		this.method = method;
		this.drawableId = R.drawable.folder_ico;
	}
	
	/**
	 * Object representing a common method
	 * 
	 * @param title
	 * @param method
	 * @param drawableId
	 */
	public CommonMethod(String title, OrbMethod method, int drawableId){
		this.title = title;
		this.method = method;
		this.drawableId = drawableId;
	}
	
	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the method
	 */
	public OrbMethod getMethod() {
		return method;
	}

	/**
	 * @param method the method to set
	 */
	public void setMethod(OrbMethod method) {
		this.method = method;
	}
	
	/**
	 * @return the drawableId
	 */
	public int getDrawableId() {
		return drawableId;
	}

	/**
	 * @param drawableId the drawableId to set
	 */
	public void setDrawableId(int drawableId) {
		this.drawableId = drawableId;
	}

	@Override
	public int getObjectType() {
		return ORB_COMMONMETHOD;
	}
}
